\(\int \frac {(a+b x) (A+B x)}{d+e x} \, dx\) [1016]

   Optimal result
   Rubi [A] (verified)
   Mathematica [A] (verified)
   Maple [A] (verified)
   Fricas [A] (verification not implemented)
   Sympy [A] (verification not implemented)
   Maxima [A] (verification not implemented)
   Giac [A] (verification not implemented)
   Mupad [B] (verification not implemented)

Optimal result

Integrand size = 18, antiderivative size = 60 \[ \int \frac {(a+b x) (A+B x)}{d+e x} \, dx=-\frac {b (B d-A e) x}{e^2}+\frac {B (a+b x)^2}{2 b e}+\frac {(b d-a e) (B d-A e) \log (d+e x)}{e^3} \]

[Out]

-b*(-A*e+B*d)*x/e^2+1/2*B*(b*x+a)^2/b/e+(-a*e+b*d)*(-A*e+B*d)*ln(e*x+d)/e^3

Rubi [A] (verified)

Time = 0.03 (sec) , antiderivative size = 60, normalized size of antiderivative = 1.00, number of steps used = 2, number of rules used = 1, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.056, Rules used = {78} \[ \int \frac {(a+b x) (A+B x)}{d+e x} \, dx=\frac {(b d-a e) (B d-A e) \log (d+e x)}{e^3}+\frac {B (a+b x)^2}{2 b e}-\frac {b x (B d-A e)}{e^2} \]

[In]

Int[((a + b*x)*(A + B*x))/(d + e*x),x]

[Out]

-((b*(B*d - A*e)*x)/e^2) + (B*(a + b*x)^2)/(2*b*e) + ((b*d - a*e)*(B*d - A*e)*Log[d + e*x])/e^3

Rule 78

Int[((a_.) + (b_.)*(x_))*((c_) + (d_.)*(x_))^(n_.)*((e_.) + (f_.)*(x_))^(p_.), x_Symbol] :> Int[ExpandIntegran
d[(a + b*x)*(c + d*x)^n*(e + f*x)^p, x], x] /; FreeQ[{a, b, c, d, e, f, n}, x] && NeQ[b*c - a*d, 0] && ((ILtQ[
n, 0] && ILtQ[p, 0]) || EqQ[p, 1] || (IGtQ[p, 0] && ( !IntegerQ[n] || LeQ[9*p + 5*(n + 2), 0] || GeQ[n + p + 1
, 0] || (GeQ[n + p + 2, 0] && RationalQ[a, b, c, d, e, f]))))

Rubi steps \begin{align*} \text {integral}& = \int \left (\frac {b (-B d+A e)}{e^2}+\frac {B (a+b x)}{e}+\frac {(-b d+a e) (-B d+A e)}{e^2 (d+e x)}\right ) \, dx \\ & = -\frac {b (B d-A e) x}{e^2}+\frac {B (a+b x)^2}{2 b e}+\frac {(b d-a e) (B d-A e) \log (d+e x)}{e^3} \\ \end{align*}

Mathematica [A] (verified)

Time = 0.02 (sec) , antiderivative size = 56, normalized size of antiderivative = 0.93 \[ \int \frac {(a+b x) (A+B x)}{d+e x} \, dx=\frac {e x (2 a B e+b (-2 B d+2 A e+B e x))+2 (b d-a e) (B d-A e) \log (d+e x)}{2 e^3} \]

[In]

Integrate[((a + b*x)*(A + B*x))/(d + e*x),x]

[Out]

(e*x*(2*a*B*e + b*(-2*B*d + 2*A*e + B*e*x)) + 2*(b*d - a*e)*(B*d - A*e)*Log[d + e*x])/(2*e^3)

Maple [A] (verified)

Time = 1.66 (sec) , antiderivative size = 66, normalized size of antiderivative = 1.10

method result size
default \(\frac {\frac {1}{2} B b e \,x^{2}+A b e x +B a e x -B b d x}{e^{2}}+\frac {\left (A a \,e^{2}-A b d e -B a d e +b B \,d^{2}\right ) \ln \left (e x +d \right )}{e^{3}}\) \(66\)
norman \(\frac {\left (A b e +B a e -B b d \right ) x}{e^{2}}+\frac {b B \,x^{2}}{2 e}+\frac {\left (A a \,e^{2}-A b d e -B a d e +b B \,d^{2}\right ) \ln \left (e x +d \right )}{e^{3}}\) \(66\)
parallelrisch \(\frac {b B \,x^{2} e^{2}+2 A \ln \left (e x +d \right ) a \,e^{2}-2 A \ln \left (e x +d \right ) b d e +2 A x b \,e^{2}-2 B \ln \left (e x +d \right ) a d e +2 B \ln \left (e x +d \right ) b \,d^{2}+2 B x a \,e^{2}-2 B x b d e}{2 e^{3}}\) \(89\)
risch \(\frac {b B \,x^{2}}{2 e}+\frac {A b x}{e}+\frac {B a x}{e}-\frac {B b d x}{e^{2}}+\frac {\ln \left (e x +d \right ) A a}{e}-\frac {\ln \left (e x +d \right ) A b d}{e^{2}}-\frac {\ln \left (e x +d \right ) B a d}{e^{2}}+\frac {\ln \left (e x +d \right ) b B \,d^{2}}{e^{3}}\) \(90\)

[In]

int((b*x+a)*(B*x+A)/(e*x+d),x,method=_RETURNVERBOSE)

[Out]

1/e^2*(1/2*B*b*e*x^2+A*b*e*x+B*a*e*x-B*b*d*x)+(A*a*e^2-A*b*d*e-B*a*d*e+B*b*d^2)/e^3*ln(e*x+d)

Fricas [A] (verification not implemented)

none

Time = 0.22 (sec) , antiderivative size = 68, normalized size of antiderivative = 1.13 \[ \int \frac {(a+b x) (A+B x)}{d+e x} \, dx=\frac {B b e^{2} x^{2} - 2 \, {\left (B b d e - {\left (B a + A b\right )} e^{2}\right )} x + 2 \, {\left (B b d^{2} + A a e^{2} - {\left (B a + A b\right )} d e\right )} \log \left (e x + d\right )}{2 \, e^{3}} \]

[In]

integrate((b*x+a)*(B*x+A)/(e*x+d),x, algorithm="fricas")

[Out]

1/2*(B*b*e^2*x^2 - 2*(B*b*d*e - (B*a + A*b)*e^2)*x + 2*(B*b*d^2 + A*a*e^2 - (B*a + A*b)*d*e)*log(e*x + d))/e^3

Sympy [A] (verification not implemented)

Time = 0.16 (sec) , antiderivative size = 53, normalized size of antiderivative = 0.88 \[ \int \frac {(a+b x) (A+B x)}{d+e x} \, dx=\frac {B b x^{2}}{2 e} + x \left (\frac {A b}{e} + \frac {B a}{e} - \frac {B b d}{e^{2}}\right ) - \frac {\left (- A e + B d\right ) \left (a e - b d\right ) \log {\left (d + e x \right )}}{e^{3}} \]

[In]

integrate((b*x+a)*(B*x+A)/(e*x+d),x)

[Out]

B*b*x**2/(2*e) + x*(A*b/e + B*a/e - B*b*d/e**2) - (-A*e + B*d)*(a*e - b*d)*log(d + e*x)/e**3

Maxima [A] (verification not implemented)

none

Time = 0.20 (sec) , antiderivative size = 66, normalized size of antiderivative = 1.10 \[ \int \frac {(a+b x) (A+B x)}{d+e x} \, dx=\frac {B b e x^{2} - 2 \, {\left (B b d - {\left (B a + A b\right )} e\right )} x}{2 \, e^{2}} + \frac {{\left (B b d^{2} + A a e^{2} - {\left (B a + A b\right )} d e\right )} \log \left (e x + d\right )}{e^{3}} \]

[In]

integrate((b*x+a)*(B*x+A)/(e*x+d),x, algorithm="maxima")

[Out]

1/2*(B*b*e*x^2 - 2*(B*b*d - (B*a + A*b)*e)*x)/e^2 + (B*b*d^2 + A*a*e^2 - (B*a + A*b)*d*e)*log(e*x + d)/e^3

Giac [A] (verification not implemented)

none

Time = 0.28 (sec) , antiderivative size = 68, normalized size of antiderivative = 1.13 \[ \int \frac {(a+b x) (A+B x)}{d+e x} \, dx=\frac {B b e x^{2} - 2 \, B b d x + 2 \, B a e x + 2 \, A b e x}{2 \, e^{2}} + \frac {{\left (B b d^{2} - B a d e - A b d e + A a e^{2}\right )} \log \left ({\left | e x + d \right |}\right )}{e^{3}} \]

[In]

integrate((b*x+a)*(B*x+A)/(e*x+d),x, algorithm="giac")

[Out]

1/2*(B*b*e*x^2 - 2*B*b*d*x + 2*B*a*e*x + 2*A*b*e*x)/e^2 + (B*b*d^2 - B*a*d*e - A*b*d*e + A*a*e^2)*log(abs(e*x
+ d))/e^3

Mupad [B] (verification not implemented)

Time = 0.10 (sec) , antiderivative size = 68, normalized size of antiderivative = 1.13 \[ \int \frac {(a+b x) (A+B x)}{d+e x} \, dx=x\,\left (\frac {A\,b+B\,a}{e}-\frac {B\,b\,d}{e^2}\right )+\frac {\ln \left (d+e\,x\right )\,\left (A\,a\,e^2+B\,b\,d^2-A\,b\,d\,e-B\,a\,d\,e\right )}{e^3}+\frac {B\,b\,x^2}{2\,e} \]

[In]

int(((A + B*x)*(a + b*x))/(d + e*x),x)

[Out]

x*((A*b + B*a)/e - (B*b*d)/e^2) + (log(d + e*x)*(A*a*e^2 + B*b*d^2 - A*b*d*e - B*a*d*e))/e^3 + (B*b*x^2)/(2*e)